/* eslint-disable no-new */
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI, { Message, MessageBox } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import axios from 'axios'
import VueResource from 'vue-resource'
// 导入全局样式
import './assets/css/global.css'
// import axios from 'axios'
import iconFont from './assets/icon/iconfont.css'

import instance from './http'
import axios from 'axios'

// axios.defaults.baseURL = 'http://10.60.36.31:8081'
Vue.prototype.$http = instance
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
axios.defaults.headers.common['token'] = window.sessionStorage.getItem('token')

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueResource)
Vue.use(iconFont)

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
